*************************************************************
*********************** CSES ANALYSIS *********************** 
*************************************************************
*************************************************************

*Set the path to your working directory 

global beg_path `" XXX "'

********************
********************
********************

* Uploading CSES data 

use `"${beg_path}Data\Micro\cses_imd_stata\cses_imd.dta"', clear
lookfor 2019_1
recode IMD2001_1 (9997 9998 9999 = .), gen(age) 
recode IMD1013_Y (9999=.), gen(year_interview)
gen yob = year_interview-age
lab var yob "Year of birth"
recode IMD3001 (9999993/9999999=.), gen(turnout)
encode IMD1004, gen(election_study)
recode IMD5051_1 (99=.), gen(polity)

encode IMD1006_NAM, gen(country_CSES)
fre country_CSES, all
gen year = IMD1008_YEAR // Election year for merge 


***This first merge provides vote at 18***
merge m:1 country_CSES year using `"${beg_path}Data\Micro\starting_year_18_CSES.dta"'
drop if _merge ==2
drop _merge

***This second merge provides GDP cutting points*** 
merge m:1 country_CSES year using `"${beg_path}Data\Micro\gdp_for_CSES.dta"' 
drop if _merge==2
drop _merge


***The third merge provides contextual controls*** 
// Creating identifying variables for the merge
recode IMD1009 (10/13=0) (20=1), gen(EL_TYPE)
lab var EL_TYPE "Presidential Election"  
* The only country with two elections of the same type in the same year is Greece
fre IMD1011_M if IMD1004 == "GRC_2012" // May - first election in 2012
fre IMD1011_M if IMD1004 == "GRC_2015" // January - first election in 2015
gen multiple_el_id = 1 

merge m:1 country_CSES year EL_TYPE multiple_el_id using `"${beg_path}Data\Micro\contextual_data_for_CSES.dta"'
fre IMD1003 if _merge == 1 // Ok: non-democratic, small countries, or upper house elections 
drop if _merge==2
drop _merge


***************************************************
**********                               ********** 
********** Generational Variables 		 ********** 
**********                               **********    
***************************************************

*Creating cohorts based on different GDP levels at birth 
// $12,000 (Affluent Cohorts)
gen new_gen_12000 = .
replace new_gen_12000 = 0 if yob!=. & GDP_12000_start_year  !=.  & GDP_12000_start_year  !=.a 
replace new_gen_12000 = 1 if yob >= GDP_12000_start_year  & GDP_12000_start_year  !=.  & GDP_12000_start_year  !=.a & yob!=. 

// $6,000
gen new_gen_6000 = .
replace new_gen_6000 = 0 if yob!=. & GDP_6000_start_year !=.  & GDP_6000_start_year !=.a 
replace new_gen_6000 = 1 if yob >= GDP_6000_start_year & GDP_6000_start_year!=.  & GDP_6000_start_year !=.a & yob!=. 

// $8,000
gen new_gen_8000 = .
replace new_gen_8000 = 0 if yob!=. & GDP_8000_start_year !=.  & GDP_8000_start_year !=.a 
replace new_gen_8000 = 1 if yob >= GDP_8000_start_year & GDP_8000_start_year!=.  & GDP_8000_start_year !=.a & yob!=. 

// $10,000
gen new_gen_10000 = .
replace new_gen_10000 = 0 if yob!=. & GDP_10000_start_year !=.  & GDP_10000_start_year !=.a 
replace new_gen_10000 = 1 if yob >= GDP_10000_start_year & GDP_10000_start_year !=.  & GDP_10000_start_year !=.a & yob!=. 

// $14,000
gen new_gen_14000 = .
replace new_gen_14000 = 0 if yob!=. & GDP_14000_start_year !=.  & GDP_14000_start_year !=.a 
replace new_gen_14000 = 1 if yob >= GDP_14000_start_year & GDP_14000_start_year !=.  & GDP_14000_start_year !=.a & yob!=. 

// $16,000
gen new_gen_16000 = .
replace new_gen_16000 = 0 if yob!=. & GDP_16000_start_year !=.  & GDP_16000_start_year !=.a 
replace new_gen_16000 = 1 if yob >= GDP_16000_start_year & GDP_16000_start_year !=.  & GDP_16000_start_year !=.a & yob!=. 

// $18,000
gen new_gen_18000 = .
replace new_gen_18000 = 0 if yob!=. & GDP_18000_start_year !=.  & GDP_18000_start_year !=.a 
replace new_gen_18000 = 1 if yob >= GDP_18000_start_year & GDP_18000_start_year !=.  & GDP_18000_start_year !=.a & yob!=. 


*Exceptions to the starting year (individuals who spent at least 10 years under GDP above the treshold before the main cutting point  
*12000) 
replace new_gen_12000 =1 if country==11 & yob == 1976 // Crotia
replace new_gen_12000 =1 if country==29 & yob > 1974 & yob < 1977 // Latvia
replace new_gen_12000 =1 if country==42 & yob > 1967 & yob < 1981 // Russia

*6000
replace new_gen_6000 =1 if country==53 & yob > 1964 & yob < 1980  // Ukraine

*8000
replace new_gen_8000 =1 if country==5 & yob > 1967 & yob < 1979 // Belarus
replace new_gen_8000 =1 if country==53 & yob > 1970 & yob < 1978 // Ukraine

*10000
replace new_gen_10000 =1 if country==5 & yob > 1971 & yob < 1980 // Belarus
replace new_gen_10000 =1 if country==8 & yob > 1974 & yob < 1979 // Bulgaria
replace new_gen_10000 =1 if country==29 & yob > 1969 & yob < 1977 // Latvia
replace new_gen_10000 =1 if country==30 & yob > 1972 & yob < 1978 // Lithuania
replace new_gen_10000 =1 if country==42 & yob > 1964 & yob < 1982 // Russia
*14000
replace new_gen_14000 =1 if country==42 & yob > 1970 & yob < 1980 // Russia
*16000
replace new_gen_16000 =1 if country==42 & yob > 1974 & yob < 1979 // Russia
*18000
// nothing

*Vote at 18
gen vote_18 =.
replace vote_18 = 0 if yob!=. & starting_year_18!=.  & starting_year_18!=.a 
replace vote_18 = 1 if (yob+18) >= starting_year_18 & starting_year_18 !=.  & starting_year_18 !=.a 
lab var vote_18 "Vote at 18"

*Born after 1959
gen after_1959 = yob > 1959 & yob !=. 

*Cohort defined by decade
gen born_before_1940s = yob < 1940
gen born_1940s	= yob >= 1940 & yob <1950
gen born_1950s	= yob >= 1950 & yob <1960
gen born_1960s	= yob >= 1960 & yob <1970
gen born_1970s	= yob >= 1970 & yob <1980
gen born_1980s	= yob >= 1980 & yob <1990 
gen born_1990s = yob >= 1990
	
lab var born_before_1940s "Born before the 1940s"	
lab var born_1940s "Born in the 1940s"	
lab var born_1950s "Born in the 1950s"		
lab var born_1960s "Born in the 1960s"		
lab var born_1970s "Born in the 1970s"		
lab var born_1980s "Born in the 1980s"		
lab var born_1990s "Born in the 1990s"		

*Pew cohortss 
gen Silent = yob <= 1945
gen Boomers = yob >= 1946 & yob <1965
gen GenX = yob >= 1966 & yob < 1981 
gen Millenials = yob >=1980 

lab var Silent "Silent Generation (-1945)"	
lab var Boomers "Boomers (1946-1964) "		
lab var GenX "Generation X (1965-1980)"		
lab var Millenials "Millenials (1981-))"		
	
lab var age "Age"
lab var new_gen_12000 "Affluent Generations"	
	
************************************************************************** 
**********                 										********** 
********** 	  Filtering: 100 % turnout and non-dem elections 	********** 
**********                										**********    
**************************************************************************
	
tabstat turnout, by(election_study)  
tabstat new_gen_12000, by(election_study) 
egen new_gen_mean = mean(new_gen_12000), by(election_study)
drop if inlist(election_study, 144, 168) // Russia 2000, Urugay 2009: turnout == 100 %.  
drop if turnout ==.
drop if polity <6 
drop if new_gen_12000==. | vote_18 ==.
tabstat turnout, by(election_study) 
lab var turnout "Turnout"
	
	
	
************************************
**********                ********** 
********** 	  Controls    ********** 
**********                **********    
************************************
	
*Sociodemographic controls
recode IMD2002 (1=0 "Male") (2=1 "Female") (else=.), gen(female)
lab var female "Female"
fre IMD2002  
recode IMD2003 (0 1=0 "Primary")(2=1 "High School") (3=2 "Some College") (4=3 "College \& Above") (else=.), gen(education)
tab education, gen(edu)
lab var edu1 "Primary" 
lab var edu2 "High School"
lab var edu3 "Some College"
lab var edu4 "College \& Above"

recode IMD2006 (1=1 "Q1") (2=2 "Q2") (3=3 "Q3") (4=4 "Q4") (5=5 "Q5") (else=.), gen(income)
tab income, gen(inc)
lab var inc1 "Income (Q1)"
lab var inc2 "Income (Q2)"
lab var inc3 "Income (Q3)"
lab var inc4 "Income (Q4)"
lab var inc5 "Income (Q5)"

recode IMD3010 (1=1 "Very Satisfied")(2=2 "Fairly Satisfied") (6=3 "Neither Satisfied Nor Dissatisfied") ///
(4=4 "Not Very Satisfied") (5=5 "Not At All Satisfied") (else=.), gen(dem_satisfaction)
tab dem_satisfaction, gen(dem_sat)
lab var dem_sat1 "Very Satisfied"
lab var dem_sat2 "Fairly Satisfied"
lab var dem_sat3 "Neither Satisfied Nor Dissatisfied"
lab var dem_sat4 "Not Very Satisfied"
lab var dem_sat5 "Not At All Satisfied"

fre IMD2019_1
recode IMD2019_1 (0 = 0 "Not TU Member") (1=1 "TU Member") (else=.), gen(TU_membership) 
lab var TU_membership "TU Member"

lab var year "Year"

***********
* Table 4 *
***********

eststo clear
eststo M1: melogit turnout new_gen_12000 c.age##c.age year i.country if IMD5007>2  || election_study:  
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace
eststo M2: melogit turnout vote_18 c.age##c.age year  i.country if IMD5007>2 || election_study: 
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace
eststo M3: melogit turnout new_gen_12000 vote_18 c.age##c.age year  i.country if IMD5007>2 || election_study: 
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace
eststo M4: melogit turnout Silent Boomers GenX c.age##c.age year  i.country   if IMD5007>2 || election_study:  
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace
eststo M5: melogit turnout new_gen_12000  Silent Boomers GenX c.age##c.age year  i.country  if IMD5007>2 || election_study: 
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace
eststo M6: melogit turnout new_gen_12000 c.age##c.age  female inc2-inc5 edu2-edu4 TU_membership EL_TYPE Majority Closeness Concurrent N_el_instit year i.country if IMD5007>2  || election_study:  // CV omitted because of collinearity 
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace


cd `"${beg_path}Results\"'

*Latex

esttab M1 M2 M3 M4 M5 M6 using Table_4.tex, incelldelimite("\:")  stats(fixed N N_elections, labels("Country FE" "N (individuals)" "N (elections)") ///
layout("\multicolumn{1}{c}{@}"  "\multicolumn{1}{c}{$@$}" "\multicolumn{1}{c}{$@$}") f(0 0)) one replace b(2) se(2) wide staraux /// 
	star(+ 0.1 * 0.05 ** 0.01 *** 0.001) eqlabels(none) drop( *.country_CSES) nodep  label  /// 
	order(new_gen_12000 vote_18 Silent Boomers GenX  age c.age#c.age female inc2 inc3 inc4 inc5 edu2 edu3 edu4 TU_membership EL_TYPE Majority Closeness Concurrent N_el_instit ///
	year _cons  var(_cons[election_study]))  nolegend nonumbers  refcat(new_gen_12000 "\textit{Generational Explanations}" ///
	age "\textit{Individual-Level Controls}" EL_TYPE "\textit{Macro-Level Controls}" , nolabel) ///
 varlabels(new_gen_12000 "Affluent Generations" vote_18 "Vote at 18" Silent "Silent Generation (-1945)" Boomers "Boomers (1946-1964) " GenX "Generation X (1965-1980)"	///
 age "Age" c.age#c.age "Age x Age"  female "Female" inc2 "Income (Q2)" inc3 "Income (Q3)" inc4 "Income (Q4)" inc5 "Income (Q5)" ///
 edu2 "High School" edu3 "Some College" edu4 "College \& Above" edu4 "College \& Above" TU_membership "TU membership" EL_TYPE ///
 "Presidential Election" Majority "Majority Status" Closeness "Closeness" Concurrent "Concurrent Elections" N_el_instit "Elective Institutions" year "Year" /// 
_cons  "Constant"  var(_cons[election_study]) "Var (Elections)", elist(GenX \hline TU_membership \hline  _cons \hline)) ///
	mtitles("\shortstack{\\S\\Affluent Generations}" "\shortstack{\\T\\Vote at 18}" ///
	"\shortstack{\\U\\Simultaneous Test}" "\shortstack{\\V\\Pew Generations}" "\shortstack{\\W\\Simultaneous Test}" "\shortstack{\\X\\All Controls}") varwidth(24) ///
	nonumbers nolegend note("") alignment(d{10})
	
*Word 	
	
	esttab M1 M2 M3 M4 M5 M6 using Table_4.rtf, incelldelimiter(" ")  stats(fixed N N_elections, labels("Country FE" "N (individuals)" "N (elections)") f(0 0)) one replace b(2) se(2) wide staraux /// 
	star(+ 0.1 * 0.05 ** 0.01 *** 0.001) eqlabels(none) drop( *.country_CSES) nodep  label  /// 
	order(new_gen_12000 vote_18 Silent Boomers GenX  age c.age#c.age female inc2 inc3 inc4 inc5 edu2 edu3 edu4 TU_membership EL_TYPE Majority Closeness Concurrent N_el_instit ///
	year _cons  var(_cons[election_study]))  nolegend nonumbers  refcat(new_gen_12000 "\textit{Generational Explanations}" ///
	age "\textit{Individual-Level Controls}" EL_TYPE "\textit{Macro-Level Controls}" , nolabel) ///
 varlabels(new_gen_12000 "Affluent Generations" vote_18 "Vote at 18" Silent "Silent Generation (-1945)" Boomers "Boomers (1946-1964) " GenX "Generation X (1965-1980)"	///
 age "Age" c.age#c.age "Age x Age"  female "Female" inc2 "Income (Q2)" inc3 "Income (Q3)" inc4 "Income (Q4)" inc5 "Income (Q5)" ///
 edu2 "High School" edu3 "Some College" edu4 "College \& Above" edu4 "College \& Above" TU_membership "TU membership" EL_TYPE ///
 "Presidential Election" Majority "Majority Status" Closeness "Closeness" Concurrent "Concurrent Elections" N_el_instit "Elective Institutions" year "Year" /// 
_cons  "Constant"  var(_cons[election_study]) "Var (elections)", elist(GenX \hline TU_membership \hline  _cons \hline)) ///  elist(GenX \hline _cons  \hline))
	mtitles("\shortstack{\\S\\Affluent Generations}" "\shortstack{\\T\\Vote at 18}" ///
	"\shortstack{\\U\\Simultaneous Test}" "\shortstack{\\V\\Pew Generations}" "\shortstack{\\W\\Simultaneous Test}" "\shortstack{\\X\\All Controls}") varwidth(24) ///
	nonumbers nolegend note("") 
	

	
*Robustness check
eststo clear
eststo M1: eststo M6: melogit turnout new_gen_12000 c.age##c.age  female inc2-inc5 edu2-edu4 TU_membership dem_sat2-dem_sat5  EL_TYPE Majority Closeness Concurrent N_el_instit year i.country if IMD5007>2  || election_study:  // CV omitted because of collinearity 
matrix x = e(N_g)
estadd scalar N_elections = x[1,1] // 
estadd local fixed "Yes" , replace

preserve 
merge m:1 country_CSES year  using `"${beg_path}Data\Micro\swiid9_0_for_merge_CSES.dta"'
drop if _merge == 2
drop _merge  
lab var gini_disp "Gini (disp. income)"
mi xtset, clear


eststo M2: mi estimate, cmdok post: melogit turnout new_gen_12000 c.age##c.age  female inc2-inc5 edu2-edu4 TU_membership EL_TYPE Majority Closeness Concurrent N_el_instit year gini_disp i.country if IMD5007>2  || election_study: 
matrix x = e(N_g)

estadd scalar N_elections = x[1,1] // Does not work because "Number of groups varies among imputations." This is not due to missing data but the method (there is the same number of missing values for all imputations).
codebook election_study if turnout!=. & new_gen_12000!=. & age!=. & female!=. & inc1!=. & edu1!=. & TU_membership!=. & EL_TYPE!=. & Majority!=. & Closenes!=. & Concurrent !=. & N_el_instit!=. & year!=. & IMD5007>2  & _1_gini_disp!=. // 108 elections
estadd scalar N_elections = 108, replace // 108 elections 
estadd local fixed "Yes" , replace

restore

*************
* Table SM3 *
*************

esttab M1 M2 using Table_SM3.tex, incelldelimite("\:")  stats(fixed N N_elections, labels("Country FE" "N (individuals)" "N (elections)") ///
layout("\multicolumn{1}{c}{@}"  "\multicolumn{1}{c}{$@$}" "\multicolumn{1}{c}{$@$}") f(0 0)) one replace b(2) se(2) wide staraux /// M4
	star(+ 0.1 * 0.05 ** 0.01 *** 0.001) eqlabels(none) drop( *.country_CSES) nodep  label  /// 
	order(new_gen_12000 age c.age#c.age female inc2 inc3 inc4 inc5 edu2 edu3 edu4 TU_membership dem_sat2 dem_sat3 dem_sat4 dem_sat5  EL_TYPE Majority Closeness Concurrent N_el_instit ///
	gini_disp year _cons  var(_cons[election_study]))  nolegend nonumbers  refcat(new_gen_12000 "\textit{Generational Explanations}" ///
	age "\textit{Individual-Level Controls}" EL_TYPE "\textit{Macro-Level Controls}" , nolabel) ///
 varlabels(new_gen_12000 "Affluent Generations" ///
 age "Age" c.age#c.age "Age x Age"  female "Female" inc2 "Income (Q2)" inc3 "Income (Q3)" inc4 "Income (Q4)" inc5 "Income (Q5)" ///
 edu2 "High School" edu3 "Some College" edu4 "College \& Above" edu4 "College \& Above" TU_membership "TU membership" ///
 dem_sat1 "Very Satisfied" dem_sat2 "Fairly Satisfied" dem_sat3 "Neither Satisfied Nor Dissatisfied" dem_sat4 "Not Very Satisfied " dem_sat5 "Not At All Satisfied" ///
 EL_TYPE  "Presidential Election" Majority "Majority Status" Closeness "Closeness" Concurrent "Concurrent Elections" N_el_instit "Elective Institutions" gini_disp "Gini (disp. income)"  year "Year" /// 
_cons  "Constant"  var(_cons[election_study]) "Var (elections)", elist(new_gen_12000 \hline dem_sat5 \hline  year \hline)) /// 
	mtitles("\shortstack{\\A15\\Democratic Satisfaction}" "\shortstack{\\A16\\Income Inequality}") varwidth(24) ///
	nonumbers nolegend note("") alignment(d{10})


*************
* Table SM5 *
*************

sutex2 turnout new_gen_12000 vote_18 Silent Boomers GenX  age female  inc1 inc2 inc3 inc4 inc5 edu1 edu2 edu3 edu4 TU_membership dem_sat1-dem_sat5  EL_TYPE Majority Closeness Concurrent N_el_instit year if IMD5007>2, tabular varlabels  replace saving(Table_SM5.tex) minmax 	
	

************
* Figure 2 *
************



*Reported turnout

gen rep_turnout=.
fre IMD1003
levels IMD1003, local(election_year)
foreach i of numlist `election_year' {
cap tab turnout if IMD1003 ==`i', matcell(x) //  
cap matrix list x
cap replace rep_turnout = x[2,1]/(x[2,1]+x[1,1]) if IMD1003 ==`i'
}

*Real Turnout
replace IMD5006_1 = . if IMD5006_1 == 999
gen real_turnout = IMD5006_1/100

*Weight
gen weight_turnout = . 
levels IMD1003, local(election_year)
foreach i of numlist `election_year'  {
capture noisily display "Election" `i' 
replace weight_turnout=real_turnout/rep_turnout if IMD1003 ==`i' & turnout==1
replace weight_turnout=(1-real_turnout)/(1-rep_turnout) if IMD1003 ==`i' & turnout==0 
}

*Test 
tab turnout [aw=weight_turnout] if IMD1003 == 75202006
tab real_turnout if IMD1003 == 75202006 // The weight works well 

melogit turnout i.new_gen_12000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 

margins new_gen_12000,  cformat(%9.2f) 

marginsplot, level(95) yline(0, lpattern(dash)) recast(scatter)  scheme(bw)  xscale(r(-.5 1.5)) xlabel(0 "{bf:Pre-Affluent Generations}"  1 "{bf:Affluent Generations}") xtitle("") title("") ///
ylabel(.6(.02).7) ytitle("Predicted robability to vote (Model S, weighted data)", size(small))  plotopts(msymbol(O))  //

preserve
serset use, clear
format _margin %9.2f
gen generation = .
replace generation = 0.3 if _n==1
replace generation = 0.7 if _n==2 

tw scatter _margin generation, ms(circle)  mlabposition(9) mlabel(_margin)   || rcap _ci_ub _ci_lb  generation, xscale(r(0 1)) xlabel(0.3 "{bf:Pre-Affluent Generations}"  0.7 "{bf:Affluent Generations}") xtitle("")  ytitle("Predicted Probability to Vote (Model S, weighted data)", size(small) margin(medsmall)) legend(off) ylabel(0.60(.02)0.70) scheme(bw) // 

graph export "Figure_2.eps", replace //  
restore


***********
*Figure 3 *
***********

eststo clear
melogit turnout i.new_gen_6000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M1: margins, dydx(new_gen_6000) post
melogit turnout i.new_gen_8000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M2: margins, dydx(new_gen_8000) post
melogit turnout i.new_gen_10000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M3: margins, dydx(new_gen_10000) post
melogit turnout i.new_gen_12000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M4: margins, dydx(new_gen_12000) post
melogit turnout i.new_gen_14000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M5: margins, dydx(new_gen_14000) post
melogit turnout i.new_gen_16000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M6: margins, dydx(new_gen_16000) post
melogit turnout i.new_gen_18000 c.age##c.age i.country if IMD5007>2 [pw=weight_turnout] || election_study: 
eststo M7: margins, dydx(new_gen_18000) post

 
 coefplot (M1, aseq("$6,000") \ M2, aseq("$8,000") \ M3, aseq("$10,000") \ M4, aseq("$12,000") \ M5, aseq("$14,000") \ M6, aseq("$16,000") \ M7, aseq("$18,000")), ///
 recast(scatter) ms(circle) msize(medium) mfcolor(black)  vertical scheme(bw) mlabel  mlabposition(9) /// 
format(%9.2f) xscale(range(0 8)) ylabel(.08(.02)-.08,format(%9.2f)) swap noeqlabels  yline(0, lpattern(dash)) ///
 ytitle("Gener. Gap in the Predicted Probability to Vote", size(medsmall) margin(medsmall)) ///
 xtitle("Alternative Generational Divides (Defined in GDP per capita)", margin(medium) size(medsmall)) legend(off)  ciopts(recast(rcap)) scale(1)

graph export "Figure_3.eps", replace // 
